#!/bin/bash

cd /home/zuwenqiang/Respo2/SimMed

export PYTHONPATH=$PWD:$PYTHONPATH



directory=Main_results/logs
if [ ! -d "$directory" ]; then
    mkdir -p "$directory"
    echo "Directory created: $directory"
else
    echo "Directory already exists: $directory"
fi



i=0
while [ $i -lt 5 ]; do
    i=$((i+1))
    # CUDA_VISIBLE_DEVICES=4,5,6,7 python -m torch.distributed.launch --nnodes 1 --node_rank 0 --master_addr 127.0.0.1 --nproc_per_node 4 --master_port 16902 finetune_gpu.py --launcher pytorch --exp_num $i configs/full/ISIC/ovit-base.py 2>> $directory/ovit.log
    # CUDA_VISIBLE_DEVICES=4,5,6,7 python -m torch.distributed.launch --nnodes 1 --node_rank 0 --master_addr 127.0.0.1 --nproc_per_node 4 --master_port 16902 finetune_gpu.py --launcher pytorch --exp_num $i configs/full/APTOS/ovit-base.py 2>> $directory/ovit.log
    CUDA_VISIBLE_DEVICES=4,5,6,7 python -m torch.distributed.launch --nnodes 1 --node_rank 0 --master_addr 127.0.0.1 --nproc_per_node 4 --master_port 16902 finetune_gpu.py --launcher pytorch --exp_num $i configs/full/chest/ovit-base.py 2>> $directory/ovit_100.log
    # CUDA_VISIBLE_DEVICES=4,5,6,7 python -m torch.distributed.launch --nnodes 1 --node_rank 0 --master_addr 127.0.0.1 --nproc_per_node 4 --master_port 16902 finetune_gpu.py --launcher pytorch --exp_num $i configs/full/colon/ovit-base.py 2>> $directory/ovit.log
    CUDA_VISIBLE_DEVICES=4,5,6,7 python -m torch.distributed.launch --nnodes 1 --node_rank 0 --master_addr 127.0.0.1 --nproc_per_node 4 --master_port 16902 finetune_gpu.py --launcher pytorch --exp_num $i configs/full/endo/ovit-base.py 2>> $directory/ovit_100.log
done